package com.bdqn.jwt1.mapper;

import com.bdqn.jwt1.entity.Role;
import com.bdqn.jwt1.entity.TUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TUserMapper {
    @Select("select * from user where username = #{username}")
    TUser findByUsername(String username);

    @Select("select * from user")
    List<TUser> findAllUsers();

    List<Role> findRolesByUserId(int id);
}
